/**
 * @param {number[]} height
 * @param {number} threshold
 * @return {number[]}
 */
var stableMountains = function(height, threshold) {
    const arr = []
    height.forEach((item, index) => {
        if (item > threshold) arr.push(index + 1)
    })
    if (arr[arr.length - 1] >= height.length) arr.pop()
    return arr
};